package com.jeasonzhao.report.engine.servlet;

import com.jeasonzhao.report.exceptions.SQLReportException;
import com.jeasonzhao.report.msg.Message;
import com.jeasonzhao.report.model.Report;

public class ReportServletException extends SQLReportException
{
    private static final long serialVersionUID = 1L;
   public ReportServletException(Object ...objs)
   {
       super(objs);
   }

   public ReportServletException(Throwable t,Object ...objs)
   {
       super(t,objs);
   }

   @Message(
       {"zh_cn","没有传入任何报表ID"
       ,"en","No report ID has been found."})
   public static class NoReportID extends ReportServletException
   {
       private static final long serialVersionUID = 1L;
       public NoReportID()
       {
           super();
       }
   }
   @Message(
       {"zh_cn","找不到ID为\"{0}\"的报表"
       ,"en","No report could be found by \"{0}\""})
   public static class NoReport extends ReportServletException
   {
       private static final long serialVersionUID = 1L;
       public NoReport(String id)
       {
           super(id);
       }
   }
   @Message(
       {"zh_cn","匿名用户不能访问报表：{0}"
       ,"en","No anonymous access for report \"{0}\""})
   public static class NoAnonymousAccess extends ReportServletException
   {
       private static final long serialVersionUID = 1L;
       public NoAnonymousAccess(Report rpt)
       {
           super(rpt);
       }
   }
   @Message(
         {"zh_cn","不能访问自定义的私人报表：{0}"
         ,"en","No access for private report \"{0}\""})
     public static class NoPrivateReportAcess extends ReportServletException
     {
         private static final long serialVersionUID = 1L;
         public NoPrivateReportAcess(Report rpt)
         {
             super(rpt);
         }
   }
   @Message(
         {"zh_cn","[系统权限不足]不能访问报表：{0}"
         ,"en","[System Access Right]No access for report \"{0}\""})
     public static class NoPriviledgeAccess extends ReportServletException
     {
         private static final long serialVersionUID = 1L;
         public NoPriviledgeAccess(Report rpt)
         {
             super(rpt);
         }
   }

}
